# enums.py

#!/usr/bin/python3
# -*- coding: utf-8 -*-
# @Author: Hui
# @Desc: { 项目枚举类模块 }
# @Date: 2021/09/23 23:37

from enum import Enum


class StatusCodeEnum(Enum):
    """状态码枚举类"""

    OK = (200, '成功')
    ERROR = (-1, '错误')
    SERVER_ERR = (500, '系统繁忙中，请稍后再试')

    # 登录
    ERR_LOGIN = (100, '登录异常请联系管理员')

    @property
    def code(self):
        """获取状态码"""
        return self.value[0]

    @property
    def msg(self):
        """获取状态码信息"""
        return self.value[1]

